import request from "@/utils/request"

// 登录
export function login (data) {
  return request({
    url: "/user/login",
    method: "post",
    data
  })
}

export function queryLoginInfo (data) {
  return request({
    url: "/user/queryMessageByProjectCode",
    method: "get",
    params: data
  })
}

// 获取用户信息和菜单
export function getInfo (token) {
  return request({
    url: "/user/queryLoginMenus",
    method: "get",
    params: { token }
  })
}

// 更新token与exp
export function updateToken () {
  return request({
    url: "/user/updateToken",
    method: "post"
  })
}


// 登出
export function logout () {
  return request({
    url: "/vue-admin-template/user/logout",
    method: "post"
  })
}
